package com.cdtye.shuoh.domain.device.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cdtye.common.mybatiscore.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 设备通道数据
 * @author ZhongWang Wang
 * @date 2022-12-21
 */
@ApiModel("设备通道数据")
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("IOT_DEVICE_CHANNEL")
public class DeviceChannel extends BaseEntity {
    @ApiModelProperty(value = "设备标识")
    private String deviceIdentification;

    @ApiModelProperty(value = "通道ID")
    private String channelId;

    @ApiModelProperty(value = "通道名称")
    private String channelName;

    @ApiModelProperty(value = "流唯一编号，存在表示正在直播")
    private String streamId;

    @ApiModelProperty(value = "状态")
    private String status;

    @TableField(exist = false)
    private String statusName;

    public String getStatusName(){
        if("1".equals(status)){
            return "在线";
        }
        return "离线";
    }
}
